'use strict';

var __importDefault =
    (this && this.__importDefault) ||
    function (mod) {
        return mod && mod.__esModule
            ? mod
            : {
                  default: mod
              };
    };

exports.__esModule = true;
/*
  两种网络请求：postRequest => POST, getRequest => GET
  请求头header: 默认json，支持自定义({})或快速写入('form', 'json')
*/

var request_1 = require('../../utils/request');

var globalData_1 = require('../../globalData');

var request = new request_1['default']({
    ApiUrl: globalData_1['default'].marketingUrl
}); // 我的拼团列表

exports.getMineGroupList = function (data) {
    return request.postRequest({
        url: 'app/activity/group/myGroup',
        data: data,
        isLoading: true
    });
}; // 拼团活动列表

exports.getGroupList = function (data) {
    return request.postRequest({
        url: 'app/activity/group/list',
        data: data,
        isLoading: true
    });
}; // 拼团活动详情

exports.getGroupDetail = function (data) {
    return request.postRequest({
        url: 'app/activity/group/detail',
        data: data,
        isLoading: true
    });
}; // 开团

exports.openGroup = function (data) {
    return request.postRequest({
        url: 'app/activity/group/open',
        data: data
    });
}; // 参团

exports.partakeGroup = function (data) {
    return request.postRequest({
        url: 'app/activity/group/partake',
        data: data,
        isLoading: true
    });
};
